<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title>2.v-html</title>
    <!-- 引入Vue -->
    <script type="text/javascript" src="../../js/vue.js"></script>
  </head>
  <body>
    <!-- 准备好一个容器-->
    <div id="demo">
      <div v-html="str1"></div>
      <div v-html="str2"></div>
    </div>

    <script type="text/javascript">
      new Vue({
        el:'#demo',
        data:{
          str1:'你好啊',
          str2:'<a href="javascript:alert(250)">外我获取红浪漫巨额优惠卷</a>'
        }
      })
    </script>
  </body>
</html>